# 打开浏览器
import time
import time
from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome(executable_path="chromedriver.exe")

# driver =webdriver.Chrome #创建浏览器对象

# 2.输入网址
driver.get("http://localhost:9092/#/user/login")
# 3.页面信息操作
driver.maximize_window()
# # 暂停3秒
# time.sleep(3)
driver.find_element(By.XPATH, "//input[@type='text']").send_keys("admin_1")
time.sleep(2)
driver.find_element(By.XPATH, "//input[@type='password']").send_keys("admin")
time.sleep(2)
driver.find_element_by_css_selector(".LoginBtn").click()
time.sleep(2)
driver.find_element(By.XPATH, "//input[@type='text']").send_keys("admin_1")
time.sleep(2)
driver.find_element(By.XPATH, "//input[@type='password']").send_keys("admin")
driver.find_element_by_css_selector(".LoginBtn").click()

# driver.find_element(By.XPATH, "//li[8]")
driver.find_element_by_css_selector('fragment="1916286fb33"').click()

time.sleep(10)
driver.quit()
